module(..., package.seeall)

local initckeditor = [======[
$(document).ready(function() {
	$('textarea.editor_ckeditor[readonly!=true]').ckeditor();
	$('textarea.editor_ckeditor[readonly]').ckeditor(function(){},{
		readOnly:true,
		toolbarStartupExpanded:false
	});
})
]======]


function initialize(user,dal,node,act,request)
	node:add_javascript_link(dal:make_url("ckeditor/ckeditor.js"))
	node:add_javascript_link(dal:make_url("ckeditor/adapters/jquery.js"))
	node:add_javascript_snippet(initckeditor)
end

